package day07;

public class CalAirPrice {
    public enum season {
        off_Season,
        peak_Season;
    }

    public static enum shippingSpace {
        firstClass,
        middleClass,
        economyClass;
    }

    public final int originalPrice = 2500;
    // public

    public static void main(String[] args) {
        CalAirPrice cap = new CalAirPrice();

       //  int price= cap.calSeason(season.off_Season,shippingSpace.economyClass);
        int month=10;
        double price;
        if(month>=4 &&month<=10)
             price= cap.calSeason(season.off_Season,shippingSpace.economyClass);
        System.out.println(season.peak_Season.name());
    }

    public double calSeason(season s, shippingSpace ss) {
        switch (s) {
            case off_Season:
                switch (ss) {
                    case firstClass:
                        //淡季头等舱
                        return originalPrice * 0.75;
                    case middleClass:
                        //淡季中等舱
                        return originalPrice * 0.55;
                    default:
                        //淡季经济舱
                        return originalPrice * 0.3;
                }
            default:
                switch (ss) {
                    case firstClass://旺季头等舱
                        return originalPrice * 0.9;
                    case middleClass:
                        return originalPrice * 0.85;
                    default:
                        return originalPrice * 0.7;
                }
        }
    }
}
